package test;

public class Dog extends Animal {
//继承出现红线鼠标放到有红线的地方 Alt+回车便可以自动生成子类构造方法
    public Dog(int age, String name) {
        super(age, name);
    }
    public void eat(){
        System.out.println("小狗正在吃.....");
    }
    public void flag(){
        System.out.println(this.name+ "小鸡在游泳....");
    }
}
